package com.example.ytyproject.controller;


import com.example.ytyproject.entity.Role;
import com.example.ytyproject.entity.vo.R;
import com.example.ytyproject.service.AreaGuizhouService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2024-04-12
 */
@RestController
@RequestMapping("/areaGuizhou")
public class AreaGuizhouController {

    @Autowired
    private AreaGuizhouService areaGuizhouService;

    @GetMapping("/tree")
    public R tree() {
        return areaGuizhouService.tree();
    }
    @GetMapping("/listByParentId")
    public R listByParentId(@Param("parentId") String parentId) {
        return areaGuizhouService.listByParentId(parentId);
    }
}
